<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>键盘监听示例</title>
</head>
<body>

<h1>请在页面上按下任意键</h1>
<p id="instruction">按下回车键会看到提示</p>

<script>
    // 为文档添加键盘按下事件监听器
    document.addEventListener('keydown', function(event) {
	    		
        // 判断是否按下了回车键
        if (event.key === 'Control') {
           
             alert(event.key);
        }
    });
</script>

</body>
</html>